.class Lcom/nemustech/regina/DialogCare$WallPaperItemAdapter;
.super Landroid/widget/BaseAdapter;
.source "DialogCare.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/nemustech/regina/DialogCare;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "WallPaperItemAdapter"
.end annotation


# instance fields
.field private final mIcon:[Ljava/lang/String;

.field private final mIconText:[Ljava/lang/String;

.field final synthetic this$0:Lcom/nemustech/regina/DialogCare;


# direct methods
.method public constructor <init>(Lcom/nemustech/regina/DialogCare;)V
    .locals 5
    .parameter

    .prologue
    const/4 v4, 0x2

    const/4 v3, 0x1

    const/4 v2, 0x0

    .line 171
    iput-object p1, p0, Lcom/nemustech/regina/DialogCare$WallPaperItemAdapter;->this$0:Lcom/nemustech/regina/DialogCare;

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 161
    new-array v0, v4, [Ljava/lang/String;

    const-string v1, "com.google.android.gallery3d"

    aput-object v1, v0, v2

    const-string v1, "com.google.android.gallery3d"

    aput-object v1, v0, v3

    iput-object v0, p0, Lcom/nemustech/regina/DialogCare$WallPaperItemAdapter;->mIcon:[Ljava/lang/String;

    .line 166
    new-array v0, v4, [Ljava/lang/String;

    const-string v1, "Gallery"

    aput-object v1, v0, v2

    const-string v1, "Regina Theme"

    aput-object v1, v0, v3

    iput-object v0, p0, Lcom/nemustech/regina/DialogCare$WallPaperItemAdapter;->mIconText:[Ljava/lang/String;

    .line 173
    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .prologue
    .line 177
    iget-object v0, p0, Lcom/nemustech/regina/DialogCare$WallPaperItemAdapter;->mIcon:[Ljava/lang/String;

    array-length v0, v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .parameter "arg0"

    .prologue
    .line 182
    const/4 v0, 0x0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 218
    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 9
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    .line 187
    move-object v5, p2

    .line 188
    .local v5, row:Landroid/view/View;
    if-nez v5, :cond_0

    .line 189
    iget-object v7, p0, Lcom/nemustech/regina/DialogCare$WallPaperItemAdapter;->this$0:Lcom/nemustech/regina/DialogCare;

    invoke-static {v7}, Lcom/nemustech/regina/DialogCare;->access$200(Lcom/nemustech/regina/DialogCare;)Lcom/nemustech/regina/ReginaLauncher;

    move-result-object v7

    invoke-virtual {v7}, Lcom/nemustech/regina/ReginaLauncher;->getLayoutInflater()Landroid/view/LayoutInflater;

    move-result-object v3

    .line 190
    .local v3, inflator:Landroid/view/LayoutInflater;
    const v7, 0x7f030009

    const/4 v8, 0x0

    invoke-virtual {v3, v7, v8}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v5

    .line 193
    .end local v3           #inflator:Landroid/view/LayoutInflater;
    :cond_0
    iget-object v7, p0, Lcom/nemustech/regina/DialogCare$WallPaperItemAdapter;->mIcon:[Ljava/lang/String;

    aget-object v1, v7, p1

    .line 196
    .local v1, icon:Ljava/lang/String;
    :try_start_0
    iget-object v7, p0, Lcom/nemustech/regina/DialogCare$WallPaperItemAdapter;->this$0:Lcom/nemustech/regina/DialogCare;

    invoke-static {v7}, Lcom/nemustech/regina/DialogCare;->access$200(Lcom/nemustech/regina/DialogCare;)Lcom/nemustech/regina/ReginaLauncher;

    move-result-object v7

    invoke-virtual {v7}, Lcom/nemustech/regina/ReginaLauncher;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v7

    invoke-virtual {v7, v1}, Landroid/content/pm/PackageManager;->getApplicationIcon(Ljava/lang/String;)Landroid/graphics/drawable/Drawable;
    :try_end_0
    .catch Landroid/content/pm/PackageManager$NameNotFoundException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v2

    .line 202
    .local v2, iconDrawable:Landroid/graphics/drawable/Drawable;
    :goto_0
    const v7, 0x7f09001c

    invoke-virtual {v5, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v4

    check-cast v4, Landroid/widget/ImageView;

    .line 203
    .local v4, iv:Landroid/widget/ImageView;
    const v7, 0x7f09001d

    invoke-virtual {v5, v7}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v6

    check-cast v6, Landroid/widget/TextView;

    .line 205
    .local v6, tv:Landroid/widget/TextView;
    if-eqz v2, :cond_1

    .line 206
    invoke-virtual {v4, v2}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

    .line 210
    :goto_1
    iget-object v7, p0, Lcom/nemustech/regina/DialogCare$WallPaperItemAdapter;->mIconText:[Ljava/lang/String;

    aget-object v7, v7, p1

    invoke-virtual {v6, v7}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 212
    return-object v5

    .line 197
    .end local v2           #iconDrawable:Landroid/graphics/drawable/Drawable;
    .end local v4           #iv:Landroid/widget/ImageView;
    .end local v6           #tv:Landroid/widget/TextView;
    :catch_0
    move-exception v7

    move-object v0, v7

    .line 199
    .local v0, e:Landroid/content/pm/PackageManager$NameNotFoundException;
    const/4 v2, 0x0

    .restart local v2       #iconDrawable:Landroid/graphics/drawable/Drawable;
    goto :goto_0

    .line 208
    .end local v0           #e:Landroid/content/pm/PackageManager$NameNotFoundException;
    .restart local v4       #iv:Landroid/widget/ImageView;
    .restart local v6       #tv:Landroid/widget/TextView;
    :cond_1
    const v7, 0x108003f

    invoke-virtual {v4, v7}, Landroid/widget/ImageView;->setImageResource(I)V

    goto :goto_1
.end method
